﻿using System;
using System.ComponentModel.DataAnnotations;
using K9Nano.Domain;

namespace K9Workflow.Forms
{
    public class FormInput : FullAuditedEntity<int>, IMayHaveTenant
    {
        public Guid? TenantId { get; set; }

        [Required]
        public int FormId { get; set; }

        [Required]
        public EInputType InputType { get; set; }

        [Required]
        [StringLength(50)]
        public string Label { get; set; }

        [Required]
        [StringLength(50)]
        public string Name { get; set; }

        public int Length { get; set; }

        [StringLength(255)]
        public string Pattern { get; set; }

        [StringLength(255)]
        public string Placeholder { get; set; }

        [StringLength(255)]
        public string ValidateMessage { get; set; }

        [Required]
        public bool Required { get; set; }

        [Required]
        public int Order { get; set; }
    }
}